<div>
    <?php

    function getSpaceCategoryDisplayName($categoryName) {

//                    $categoryName = $category->getName();
        switch ($categoryName) {
            case BSpaceGroup::Group_Category_General:
                $categoryName = Yii::t('site', BSpaceGroup::Group_Category_General);
                break;
            case BSpaceGroup::Group_Category_Business:
                $categoryName = Yii::t('site', BSpaceGroup::Group_Category_Business);
                break;
            case BSpaceGroup::Group_Category_Public:
                $categoryName = Yii::t('site', BSpaceGroup::Group_Category_Public);
                break;
            case BSpaceGroup::Group_Category_NoneProfit:
                $categoryName = Yii::t('site', BSpaceGroup::Group_Category_NoneProfit);
                break;
            default:
                $categoryName = Yii::t('site', BSpaceGroup::Group_Category_General);
        }
        return $categoryName;
    }

    $screen = Blyn::app()->getUIManager()->getCurrentScreen();
    $currentSpace = Blyn::app()->getActiveSpace()->getUIManager();
    //$spaceControl = Blyn::app()->getActiveSpace()->getUIManager();
    //$screenFlow = Blyn::app()->getUIManager()->getCurrentScreenFlow();

    $confirmStr = Yii::t('site', 'Confirm');
    $cancelStr = Yii::t('site', 'Cancel');
    //$spaceNameStr = Yii::t('site', 'Space Name:');
    $spaceCategoryStr = Yii::t('site', 'Space Category:');
    //$spaceRoleStr = Yii::t('site', 'Space Role:');
    //$summaryList = $screenFlow->getContextVariable('summaryList');
//$model = Blyn::app()->getActiveApp()->getFormModel('CreateSpaceFormModel');
    ?>


    <h2><?php echo Yii::t('site', 'Create Space Summary'); ?></h2>

    <legend></legend>

    <table class="table table-striped">
        <?php foreach ($summaryList as $key => $item) { ?>
            <tr><td><?php echo $key; ?></td>
                <td><?php
        if ($key == $spaceCategoryStr)
            echo getSpaceCategoryDisplayName($item);
        else
            echo $item;
            ?>
                </td>
            </tr>
        <?php } ?>
    </table>
    <?php //}       ?>

    <div>
        <?php
        echo $screen->getAjaxLink(array('id' => 'createSpaceSummary_confirm', 'name' => $confirmStr), array('htmlOptions' => array('class' => 'btn')), NULL, NULL, $currentSpace);
        ?>
        <?php
        echo $screen->getAjaxLink($cancelStr, array('htmlOptions' => array('class' => 'btn')));
        ?>
    </div>
</div>

